<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生用户注册</title>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>bootstrap/css/bootstrap-responsive.css">
<script src="<%=basePath%>bootstrap/js/bootstrap.js"
	type="text/javascript"></script>
<script src="<%=basePath%>js/jquery-1.7.2.min.js" type="text/javascript"></script>

</head>

<body bgcolor="#F6F6F">
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="row-fluid">
					<div class="span2"></div>
					<div class="span6">
						<h1>学生注册信息</h1>
					</div>
					<div class="span4"></div>
				</div>

			</div>
		</div>
		<div class="row-fluid">
			<div class="span2">
				<ul class="unstyled">
					<li><a href="<%=basePath%>showstudentlogin"><span
							style="color: red;">学生登录</span></a></li>
					<li><a href="<%=basePath%>showteacherlogin">教师登录</a></li>
					<li><a href="<%=basePath%>showadminlogin">管理员登录</a></li>
					<li><a href="<%=basePath%>showstudentregister">学生注册</a></li>
				</ul>
			</div>
			<div class="span6">
				<form class="form-horizontal"
					action="<%=basePath%>user/student/register" method="post">
					<div class="control-group">
					<script type="text/javascript">
						$(function(){
							$("form > div > div> input[name=studentid]").blur(function( e ){
								var input=$(this);
								var value=input.val();
								
								$.get("<%=basePath%>/user/student/checkstudentid",{studentid:value},
										function(data)
										{
										$(".showcheckstuidinfo").html(data.elseinfo);
										}
										,"json"
										);
							});
							}
						);
					</script>
						<label class="control-label" for="inputEmail">学号</label>
						<div class="controls">
							<input type="text" name="studentid" />
						</div>
						<div class="showcheckstuidinfo"></div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">用户名</label>
						<div class="controls">
						
						<script type="text/javascript">
						
						$(
							function(){
							
							$("form > div > div> input[name=name]").blur(function( e ){
								
								var input = $( this );
								var value = input.val();
								
								/* alert(value); */
								
								$.get("<%=basePath%>/user/student/checkuser",{username:value},
								function(data){
									//var data = {code:500,msg:success}
									$(".showchecknameinfo").html( data.elseinfo );//.css("color",data.code == 200 ? "green" : "red");
								}
								,"json");
							});
						}
						);
						
								
						</script>
							<input type="text" name="name" id="inputname" onblur="judgeTheInputName()"/>
							<div class="showchecknameinfo"></div>
						</div>
						
						
					</div>
					<div class="control-group">
						<label class="control-label" for="inputPassword">密码</label>
						<div class="controls">
							<input id="inputPassword" type="password" name="pass" />
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
							<button type="submit" class="btn">注册</button>
						</div>
					</div>
				</form>
			</div>
			<div class="span4"></div>
		</div>
	</div>



	<%-- 	<form action="<%=basePath%>user/student/register" method="post">
		登录用户名：<input type="text" name="name"><br> 学号：<input
			type="text" name="studentid"><br> 密码：<input
			type="password" name="pass"><br> <input type="submit"
			value="提交">
	</form> --%>
</body>
</html>